package jfds.clases;

import javax.swing.JProgressBar;

public class Cargar extends Thread {

	JProgressBar progreso;


	public Cargar(JProgressBar completado) {
		super();
		this.progreso = completado;
	}
	
	public void run (){
		for (int progres=1; progres<=100; progres++){
			progreso.setValue(progres);
			pausa(30);
		}
	}
	
	public void pausa(int mlSeg){
		try{
			Thread.sleep(mlSeg);
			
		}catch (Exception e){
			
			e.printStackTrace();

		}
	}

}
